package com.settlement.system.mapper;

import com.settlement.system.model.entity.common.SinglePage;
import com.settlement.system.model.entity.common.TblReceiveRefundShop;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * 收退款-店铺 Mapper 接口
 *
 * @author Ximi
 * @since 2020-07-07
 */
public interface TblReceiveRefundShopMapper extends BaseMapper {

    /**
     * 根据nc店铺编码 获取店铺
     *
     * @param ncShopNo nc 店铺编码
     * @return
     */
    public TblReceiveRefundShop getShop(@Param("ncShopNo") String ncShopNo);

    /**
     * 根据店铺编码获取店铺
     *
     * @param shopNo
     * @return
     */
    public TblReceiveRefundShop getByShopNo(@Param("shopNo") String shopNo);

    /**
     * 根据NC店铺编码获取店铺
     *
     * @param ncShopNo
     * @return
     */
    public TblReceiveRefundShop getByNcShopNo(@Param("ncShopNo") String ncShopNo);

    /**
     * 根据NC店铺名称获取店铺
     *
     * @param ncShopName
     * @return
     */
    public TblReceiveRefundShop getByNcShopName(@Param("ncShopName") String ncShopName);

    /**
     * 通过入账主体获取店铺表
     *
     * @param ncEnterAccountBody 入账主体
     * @return
     */
    public List<TblReceiveRefundShop> getByNcEnterAccountBody(@Param("ncEnterAccountBody") String ncEnterAccountBody) ;

    /**
     * 通过三级来源编码获取
     *
     * @param threeChannelNo
     * @return
     */
    public TblReceiveRefundShop getByThreeChannelNo(@Param("threeChannelNo") String threeChannelNo);

    /**
     * 获取NC店铺的分页账单接口
     *
     * @param page
     * @param params
     * @param orderByField
     * @param orderBy
     * @return
     */
    public List<TblReceiveRefundShop> getNcShop(@Param("page") SinglePage page, @Param("params") Map<String, Object> params,
                                                @Param("orderByField") String orderByField, @Param("orderBy") String orderBy);


    /**
     * 获取NC店铺的数量
     *
     * @param params
     * @return
     */
    public Integer getNcShopCount(@Param("params") Map<String, Object> params);


    TblReceiveRefundShop selectExistShop(@Param("params") TblReceiveRefundShop subject);

}

